package com.totoro.spring.spring_demo.property.profile;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Profile;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
import org.springframework.test.context.ActiveProfiles;

/**
 * Created by Niki on 2018/6/14 18:29
 */
@Component
public class ProfileReadProperties  {
    @Autowired
    Properties properties;

    public String getEnv() {
        return properties.getProperties("current.env");
    }
}
